<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilskey: xilskey_bbram.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilskey
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xilskey__bbram_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">xilskey_bbram.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p><a class="el" href="xilskey__bbram_8c.html" title="xilskey_bbram.c ">xilskey_bbram.c</a> </p>
<dl class="section note"><dt>Note</dt><dd><pre class="fragment">                    .
</pre></dd></dl>
<p>MODIFICATION HISTORY:</p>
<p>Ver Who Date Changes </p>
<hr/>
<p> 1.01a hk 09/18/13 First release 3.00 vns 31/07/15 Removed redundant code to initialise timer. 5.00 vns 09/01/16 Added BBRAM programming functionality for Ultrascale 6.0 vns 07/28/16 Added configuration counting feature and Obfuscated key programming and calculation of ECC for 28 bits of control word. 6.6 vns 06/06/18 Added doxygen tags 6.7 psl 03/20/19 Added BBRAM key write support for SSIT devices. arc 04/04/19 Fixed CPP warnings. psl 04/15/19 Moved XilSKey_Bbram_JTAGServerInit function from examples to library. 6.8 psl 05/21/19 Added check for SystemInitDone, to initialize jtag server only once to solve stack corruption issue. vns 08/29/19 Initialized Status variables 6.9 vns 03/18/20 Fixed Armcc compilation errors 7.2 am 07/13/21 Fixed doxygen warnings</p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ac4e86280db1b97bb2253ba82eb914934"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#ac4e86280db1b97bb2253ba82eb914934">XSK_BBRAM_CTRL_ECC_MASK</a>&#160;&#160;&#160;(0x003F)</td></tr>
<tr class="memdesc:ac4e86280db1b97bb2253ba82eb914934"><td class="mdescLeft">&#160;</td><td class="mdescRight">Error detection mask.  <a href="#ac4e86280db1b97bb2253ba82eb914934">More...</a><br/></td></tr>
<tr class="separator:ac4e86280db1b97bb2253ba82eb914934"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addff0189313f3b97b24102bc278de3f4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#addff0189313f3b97b24102bc278de3f4">XSK_BBRAM_CTRL_RSRVD_MASK</a>&#160;&#160;&#160;(0x0440)</td></tr>
<tr class="memdesc:addff0189313f3b97b24102bc278de3f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reserved bits.  <a href="#addff0189313f3b97b24102bc278de3f4">More...</a><br/></td></tr>
<tr class="separator:addff0189313f3b97b24102bc278de3f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7eddce1be97f979dc917adf79b7e517d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#a7eddce1be97f979dc917adf79b7e517d">XSK_BBRAM_CTRL_BLACK_KEY_MASK</a>&#160;&#160;&#160;(0x0300)</td></tr>
<tr class="memdesc:a7eddce1be97f979dc917adf79b7e517d"><td class="mdescLeft">&#160;</td><td class="mdescRight">BLACK key mask.  <a href="#a7eddce1be97f979dc917adf79b7e517d">More...</a><br/></td></tr>
<tr class="separator:a7eddce1be97f979dc917adf79b7e517d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2f4dbc4519ddc9b4c31b32c17084244"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#ae2f4dbc4519ddc9b4c31b32c17084244">XSK_BBRAM_CTRL_BLACK_KEY_SHIFT</a>&#160;&#160;&#160;(8)</td></tr>
<tr class="memdesc:ae2f4dbc4519ddc9b4c31b32c17084244"><td class="mdescLeft">&#160;</td><td class="mdescRight">BLACK key shift.  <a href="#ae2f4dbc4519ddc9b4c31b32c17084244">More...</a><br/></td></tr>
<tr class="separator:ae2f4dbc4519ddc9b4c31b32c17084244"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90fa3af76847fb390c506d2ec3e6a013"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#a90fa3af76847fb390c506d2ec3e6a013">XSK_BBRAM_CTRL_MODE_MASK</a>&#160;&#160;&#160;(0x3000)</td></tr>
<tr class="memdesc:a90fa3af76847fb390c506d2ec3e6a013"><td class="mdescLeft">&#160;</td><td class="mdescRight">DPA mode mask.  <a href="#a90fa3af76847fb390c506d2ec3e6a013">More...</a><br/></td></tr>
<tr class="separator:a90fa3af76847fb390c506d2ec3e6a013"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae65e6b2e280333736986964d15a67e14"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#ae65e6b2e280333736986964d15a67e14">XSK_BBRAM_CTRL_MODE_SHIFT</a>&#160;&#160;&#160;(12)</td></tr>
<tr class="memdesc:ae65e6b2e280333736986964d15a67e14"><td class="mdescLeft">&#160;</td><td class="mdescRight">DPA mode shift.  <a href="#ae65e6b2e280333736986964d15a67e14">More...</a><br/></td></tr>
<tr class="separator:ae65e6b2e280333736986964d15a67e14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25c8c6bfde5f6c7692fd9067365ed0cd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#a25c8c6bfde5f6c7692fd9067365ed0cd">XSK_BBRAM_CTRL_DPA_PROTECT_MASK</a>&#160;&#160;&#160;(0xC000)</td></tr>
<tr class="memdesc:a25c8c6bfde5f6c7692fd9067365ed0cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">DPA Protection mask.  <a href="#a25c8c6bfde5f6c7692fd9067365ed0cd">More...</a><br/></td></tr>
<tr class="separator:a25c8c6bfde5f6c7692fd9067365ed0cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa870401e8478ea99b0bdd11b073c4fdf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#aa870401e8478ea99b0bdd11b073c4fdf">XSK_BBRAM_CTRL_DPA_PROTECT_SHIFT</a>&#160;&#160;&#160;(14)</td></tr>
<tr class="memdesc:aa870401e8478ea99b0bdd11b073c4fdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">DPA protection shift.  <a href="#aa870401e8478ea99b0bdd11b073c4fdf">More...</a><br/></td></tr>
<tr class="separator:aa870401e8478ea99b0bdd11b073c4fdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7726c641138abacc9fa6cadeab13f6ff"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#a7726c641138abacc9fa6cadeab13f6ff">XSK_BBRAM_CTRL_RD_DPA_COUNT_MASK</a>&#160;&#160;&#160;(0x00FF0000)</td></tr>
<tr class="memdesc:a7726c641138abacc9fa6cadeab13f6ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Redundant DPA count mask.  <a href="#a7726c641138abacc9fa6cadeab13f6ff">More...</a><br/></td></tr>
<tr class="separator:a7726c641138abacc9fa6cadeab13f6ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5f9cd3602ac41d928c6d37652bdf359"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#af5f9cd3602ac41d928c6d37652bdf359">XSK_BBRAM_CTRL_RD_DPA_COUNT_SHIFT</a>&#160;&#160;&#160;(16)</td></tr>
<tr class="memdesc:af5f9cd3602ac41d928c6d37652bdf359"><td class="mdescLeft">&#160;</td><td class="mdescRight">Redundant DPA count shift.  <a href="#af5f9cd3602ac41d928c6d37652bdf359">More...</a><br/></td></tr>
<tr class="separator:af5f9cd3602ac41d928c6d37652bdf359"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a118130460195682f2379f18d159dc752"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#a118130460195682f2379f18d159dc752">XSK_BBRAM_CTRL_DPA_COUNT_MASK</a>&#160;&#160;&#160;(0xFF000000)</td></tr>
<tr class="memdesc:a118130460195682f2379f18d159dc752"><td class="mdescLeft">&#160;</td><td class="mdescRight">DPA count mask.  <a href="#a118130460195682f2379f18d159dc752">More...</a><br/></td></tr>
<tr class="separator:a118130460195682f2379f18d159dc752"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00b5d4ca37bcb6a8ead3149f16826154"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#a00b5d4ca37bcb6a8ead3149f16826154">XSK_BBRAM_CTRL_DPA_COUNT_SHIFT</a>&#160;&#160;&#160;(24)</td></tr>
<tr class="memdesc:a00b5d4ca37bcb6a8ead3149f16826154"><td class="mdescLeft">&#160;</td><td class="mdescRight">DPA count shift.  <a href="#a00b5d4ca37bcb6a8ead3149f16826154">More...</a><br/></td></tr>
<tr class="separator:a00b5d4ca37bcb6a8ead3149f16826154"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01779e9cadba0ab78610478ad14cfa2d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#a01779e9cadba0ab78610478ad14cfa2d">XSK_BBRAM_CTRL_DEFAULT_VAL</a>&#160;&#160;&#160;(0x1)</td></tr>
<tr class="memdesc:a01779e9cadba0ab78610478ad14cfa2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable value.  <a href="#a01779e9cadba0ab78610478ad14cfa2d">More...</a><br/></td></tr>
<tr class="separator:a01779e9cadba0ab78610478ad14cfa2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe7253a7f8dd6655a48687dc111ff1ce"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#abe7253a7f8dd6655a48687dc111ff1ce">XSK_BBRAM_CTRL_ENABLE_VAL</a>&#160;&#160;&#160;(0x2)</td></tr>
<tr class="memdesc:abe7253a7f8dd6655a48687dc111ff1ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Value for default state.  <a href="#abe7253a7f8dd6655a48687dc111ff1ce">More...</a><br/></td></tr>
<tr class="separator:abe7253a7f8dd6655a48687dc111ff1ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">DEF masks for BBRAM</div></td></tr>
<tr class="memitem:ada4b013693a2e811fe8eff6c71bc66dc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#ada4b013693a2e811fe8eff6c71bc66dc">XSK_BBRAM_P0_MASK</a>&#160;&#160;&#160;0X36AD555</td></tr>
<tr class="memdesc:ada4b013693a2e811fe8eff6c71bc66dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">&lt; DEF masks for calculating ECC of 28 bit 0f a control word  <a href="#ada4b013693a2e811fe8eff6c71bc66dc">More...</a><br/></td></tr>
<tr class="separator:ada4b013693a2e811fe8eff6c71bc66dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc70f289b2327e6b4da87f7b9e8c86f4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abc70f289b2327e6b4da87f7b9e8c86f4"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XSK_BBRAM_P1_MASK</b>&#160;&#160;&#160;0X2D9B333</td></tr>
<tr class="separator:abc70f289b2327e6b4da87f7b9e8c86f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8442bb1bab09519255f615cb9025f7e8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8442bb1bab09519255f615cb9025f7e8"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XSK_BBRAM_P2_MASK</b>&#160;&#160;&#160;0X1C78F0F</td></tr>
<tr class="separator:a8442bb1bab09519255f615cb9025f7e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2591ae3f096c57966a0b842744867df7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2591ae3f096c57966a0b842744867df7"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XSK_BBRAM_P3_MASK</b>&#160;&#160;&#160;0X03F80FF</td></tr>
<tr class="separator:a2591ae3f096c57966a0b842744867df7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dabb65404da8882303e3c9037c52801"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8dabb65404da8882303e3c9037c52801"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>XSK_BBRAM_P4_MASK</b>&#160;&#160;&#160;0X0007FFF</td></tr>
<tr class="separator:a8dabb65404da8882303e3c9037c52801"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a399e6b6a3d8842f49de0758c5b25c67d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#a399e6b6a3d8842f49de0758c5b25c67d">JtagServerInitBbram</a> (XilSKey_Bbram *InstancePtr)</td></tr>
<tr class="memdesc:a399e6b6a3d8842f49de0758c5b25c67d"><td class="mdescLeft">&#160;</td><td class="mdescRight">JTAG Server Initialization routine for Bbram.  <a href="#a399e6b6a3d8842f49de0758c5b25c67d">More...</a><br/></td></tr>
<tr class="separator:a399e6b6a3d8842f49de0758c5b25c67d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abae9797f8dabe8fe6089a60337059572"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#abae9797f8dabe8fe6089a60337059572">Bbram_Init</a> (void)</td></tr>
<tr class="memdesc:abae9797f8dabe8fe6089a60337059572"><td class="mdescLeft">&#160;</td><td class="mdescRight">BBRAM Algorithm - Initialization.  <a href="#abae9797f8dabe8fe6089a60337059572">More...</a><br/></td></tr>
<tr class="separator:abae9797f8dabe8fe6089a60337059572"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78e9cdbbe9a8bb08255b8cdada63efe5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#a78e9cdbbe9a8bb08255b8cdada63efe5">Bbram_ProgramKey</a> (XilSKey_Bbram *InstancePtr)</td></tr>
<tr class="memdesc:a78e9cdbbe9a8bb08255b8cdada63efe5"><td class="mdescLeft">&#160;</td><td class="mdescRight">BBRAM Algorithm - Program key.  <a href="#a78e9cdbbe9a8bb08255b8cdada63efe5">More...</a><br/></td></tr>
<tr class="separator:a78e9cdbbe9a8bb08255b8cdada63efe5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0099206e41d3ca07d3d0feeb8a1802bb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#a0099206e41d3ca07d3d0feeb8a1802bb">Bbram_VerifyKey</a> (XilSKey_Bbram *InstancePtr)</td></tr>
<tr class="memdesc:a0099206e41d3ca07d3d0feeb8a1802bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">BBRAM Algorithm - Verify key.  <a href="#a0099206e41d3ca07d3d0feeb8a1802bb">More...</a><br/></td></tr>
<tr class="separator:a0099206e41d3ca07d3d0feeb8a1802bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d6c014687d7fabae96174e4e80907a3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#a7d6c014687d7fabae96174e4e80907a3">Bbram_DeInit</a> (void)</td></tr>
<tr class="memdesc:a7d6c014687d7fabae96174e4e80907a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">De-initialization.  <a href="#a7d6c014687d7fabae96174e4e80907a3">More...</a><br/></td></tr>
<tr class="separator:a7d6c014687d7fabae96174e4e80907a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37c270a53d567eed209d11b83d16cca7"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#a37c270a53d567eed209d11b83d16cca7">XilSKey_RowCrcCalculation</a> (u32 PrevCRC, u32 Data, u32 Addr)</td></tr>
<tr class="memdesc:a37c270a53d567eed209d11b83d16cca7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates CRC value for each row of AES key.  <a href="#a37c270a53d567eed209d11b83d16cca7">More...</a><br/></td></tr>
<tr class="separator:a37c270a53d567eed209d11b83d16cca7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4a6efa27285760c27b787dfa7a7f54a2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynq__ultra__bbram.html#ga4a6efa27285760c27b787dfa7a7f54a2">XilSKey_Bbram_JTAGServerInit</a> (XilSKey_Bbram *InstancePtr)</td></tr>
<tr class="memdesc:ga4a6efa27285760c27b787dfa7a7f54a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initializes JTAG server.  <a href="group__xilskey__zynq__ultra__bbram.html#ga4a6efa27285760c27b787dfa7a7f54a2">More...</a><br/></td></tr>
<tr class="separator:ga4a6efa27285760c27b787dfa7a7f54a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac7bc27c2933ca2ed403fb3487beee6f8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynq__ultra__bbram.html#gac7bc27c2933ca2ed403fb3487beee6f8">XilSKey_Bbram_Program</a> (XilSKey_Bbram *InstancePtr)</td></tr>
<tr class="memdesc:gac7bc27c2933ca2ed403fb3487beee6f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function implements the BBRAM algorithm for programming and verifying key.  <a href="group__xilskey__zynq__ultra__bbram.html#gac7bc27c2933ca2ed403fb3487beee6f8">More...</a><br/></td></tr>
<tr class="separator:gac7bc27c2933ca2ed403fb3487beee6f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ad332b969fb28da07cb32106cb4fbebf4"><td class="memItemLeft" align="right" valign="top">XilSKey_JtagSlr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram_8c.html#ad332b969fb28da07cb32106cb4fbebf4">XilSKeyJtag</a></td></tr>
<tr class="memdesc:ad332b969fb28da07cb32106cb4fbebf4"><td class="mdescLeft">&#160;</td><td class="mdescRight">JTAG Tap Instance.  <a href="#ad332b969fb28da07cb32106cb4fbebf4">More...</a><br/></td></tr>
<tr class="separator:ad332b969fb28da07cb32106cb4fbebf4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a7eddce1be97f979dc917adf79b7e517d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_BLACK_KEY_MASK&#160;&#160;&#160;(0x0300)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>BLACK key mask. </p>

</div>
</div>
<a class="anchor" id="ae2f4dbc4519ddc9b4c31b32c17084244"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_BLACK_KEY_SHIFT&#160;&#160;&#160;(8)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>BLACK key shift. </p>

</div>
</div>
<a class="anchor" id="a01779e9cadba0ab78610478ad14cfa2d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_DEFAULT_VAL&#160;&#160;&#160;(0x1)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable value. </p>

</div>
</div>
<a class="anchor" id="a118130460195682f2379f18d159dc752"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_DPA_COUNT_MASK&#160;&#160;&#160;(0xFF000000)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>DPA count mask. </p>

</div>
</div>
<a class="anchor" id="a00b5d4ca37bcb6a8ead3149f16826154"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_DPA_COUNT_SHIFT&#160;&#160;&#160;(24)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>DPA count shift. </p>

</div>
</div>
<a class="anchor" id="a25c8c6bfde5f6c7692fd9067365ed0cd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_DPA_PROTECT_MASK&#160;&#160;&#160;(0xC000)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>DPA Protection mask. </p>

</div>
</div>
<a class="anchor" id="aa870401e8478ea99b0bdd11b073c4fdf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_DPA_PROTECT_SHIFT&#160;&#160;&#160;(14)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>DPA protection shift. </p>

</div>
</div>
<a class="anchor" id="ac4e86280db1b97bb2253ba82eb914934"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_ECC_MASK&#160;&#160;&#160;(0x003F)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Error detection mask. </p>

</div>
</div>
<a class="anchor" id="abe7253a7f8dd6655a48687dc111ff1ce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_ENABLE_VAL&#160;&#160;&#160;(0x2)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Value for default state. </p>

</div>
</div>
<a class="anchor" id="a90fa3af76847fb390c506d2ec3e6a013"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_MODE_MASK&#160;&#160;&#160;(0x3000)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>DPA mode mask. </p>

</div>
</div>
<a class="anchor" id="ae65e6b2e280333736986964d15a67e14"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_MODE_SHIFT&#160;&#160;&#160;(12)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>DPA mode shift. </p>

</div>
</div>
<a class="anchor" id="a7726c641138abacc9fa6cadeab13f6ff"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_RD_DPA_COUNT_MASK&#160;&#160;&#160;(0x00FF0000)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Redundant DPA count mask. </p>

</div>
</div>
<a class="anchor" id="af5f9cd3602ac41d928c6d37652bdf359"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_RD_DPA_COUNT_SHIFT&#160;&#160;&#160;(16)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Redundant DPA count shift. </p>

</div>
</div>
<a class="anchor" id="addff0189313f3b97b24102bc278de3f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_CTRL_RSRVD_MASK&#160;&#160;&#160;(0x0440)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reserved bits. </p>

</div>
</div>
<a class="anchor" id="ada4b013693a2e811fe8eff6c71bc66dc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSK_BBRAM_P0_MASK&#160;&#160;&#160;0X36AD555</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>&lt; DEF masks for calculating ECC of 28 bit 0f a control word </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a7d6c014687d7fabae96174e4e80907a3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Bbram_DeInit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>De-initialization. </p>
<p>De-initialization.</p>
<dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
<dl class="section note"><dt>Note</dt><dd></dd></dl>

<p>References <a class="el" href="xilskey__jscmd_8c.html#a50f568193dfe2570ed49e4e368725e2b">calcInstr()</a>, <a class="el" href="xilskey__jscmd_8c.html#a78af9b51ba9fcca1fee4e43816ccf78f">jtag_navigate()</a>, <a class="el" href="xilskey__jscmd_8c.html#aaebc31c432e1cd2d9ebdbaa0b06a4995">jtag_setPreAndPostPads()</a>, <a class="el" href="xilskey__jscmd_8c.html#a7464db2af53dd1a43ebc36827189cb52">jtag_shift()</a>, and <a class="el" href="xilskey__bbram_8c.html#ad332b969fb28da07cb32106cb4fbebf4">XilSKeyJtag</a>.</p>

</div>
</div>
<a class="anchor" id="abae9797f8dabe8fe6089a60337059572"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Bbram_Init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>BBRAM Algorithm - Initialization. </p>
<p>BBRAM Algorithm - Initialization.</p>
<dl class="section return"><dt>Returns</dt><dd><pre class="fragment">  - XST_FAILURE - In case of failure
  - XST_SUCCESS - In case of Success
</pre></dd></dl>
<dl class="section note"><dt>Note</dt><dd></dd></dl>

<p>References <a class="el" href="xilskey__jscmd_8c.html#a50f568193dfe2570ed49e4e368725e2b">calcInstr()</a>, <a class="el" href="xilskey__jscmd_8c.html#a78af9b51ba9fcca1fee4e43816ccf78f">jtag_navigate()</a>, <a class="el" href="xilskey__jscmd_8c.html#aaebc31c432e1cd2d9ebdbaa0b06a4995">jtag_setPreAndPostPads()</a>, <a class="el" href="xilskey__jscmd_8c.html#a7464db2af53dd1a43ebc36827189cb52">jtag_shift()</a>, <a class="el" href="xilskey__utils_8c.html#a2a71bd701b24852c007d5ebad8acc257">XilSKey_Efuse_IsTimerExpired()</a>, <a class="el" href="xilskey__utils_8c.html#ab2eaa24ca4b7d40aab0d75804d217616">XilSKey_Efuse_SetTimeOut()</a>, and <a class="el" href="xilskey__bbram_8c.html#ad332b969fb28da07cb32106cb4fbebf4">XilSKeyJtag</a>.</p>

</div>
</div>
<a class="anchor" id="a78e9cdbbe9a8bb08255b8cdada63efe5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Bbram_ProgramKey </td>
          <td>(</td>
          <td class="paramtype">XilSKey_Bbram *&#160;</td>
          <td class="paramname"><em>InstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>BBRAM Algorithm - Program key. </p>
<p>BBRAM Algorithm - Program key.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- instance pointer</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><pre class="fragment">  - XST_FAILURE - In case of failure
  - XST_SUCCESS - In case of Success
</pre></dd></dl>
<dl class="section note"><dt>Note</dt><dd></dd></dl>

<p>References <a class="el" href="xilskey__jscmd_8c.html#a50f568193dfe2570ed49e4e368725e2b">calcInstr()</a>, <a class="el" href="xilskey__jscmd_8c.html#a78af9b51ba9fcca1fee4e43816ccf78f">jtag_navigate()</a>, <a class="el" href="xilskey__jscmd_8c.html#aaebc31c432e1cd2d9ebdbaa0b06a4995">jtag_setPreAndPostPads()</a>, <a class="el" href="xilskey__jscmd_8c.html#a7464db2af53dd1a43ebc36827189cb52">jtag_shift()</a>, <a class="el" href="xilskey__jscmd_8c.html#a3222cb7373329b7e49fb631629e297d4">setPin()</a>, and <a class="el" href="xilskey__bbram_8c.html#ad332b969fb28da07cb32106cb4fbebf4">XilSKeyJtag</a>.</p>

</div>
</div>
<a class="anchor" id="a0099206e41d3ca07d3d0feeb8a1802bb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Bbram_VerifyKey </td>
          <td>(</td>
          <td class="paramtype">XilSKey_Bbram *&#160;</td>
          <td class="paramname"><em>InstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>BBRAM Algorithm - Verify key. </p>
<p>BBRAM Algorithm - Verify key.</p>
<p>Program and verify key have to be done together; These API's cannot be used independently.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- instance pointer</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><pre class="fragment">  - XST_FAILURE - In case of failure
  - XST_SUCCESS - In case of Success
</pre></dd></dl>
<dl class="section note"><dt>Note</dt><dd></dd></dl>

<p>References <a class="el" href="xilskey__jscmd_8c.html#a50f568193dfe2570ed49e4e368725e2b">calcInstr()</a>, <a class="el" href="xilskey__jscmd_8c.html#a78af9b51ba9fcca1fee4e43816ccf78f">jtag_navigate()</a>, <a class="el" href="xilskey__jscmd_8c.html#aaebc31c432e1cd2d9ebdbaa0b06a4995">jtag_setPreAndPostPads()</a>, <a class="el" href="xilskey__jscmd_8c.html#a7464db2af53dd1a43ebc36827189cb52">jtag_shift()</a>, <a class="el" href="xilskey__jscmd_8c.html#a3222cb7373329b7e49fb631629e297d4">setPin()</a>, and <a class="el" href="xilskey__bbram_8c.html#ad332b969fb28da07cb32106cb4fbebf4">XilSKeyJtag</a>.</p>

</div>
</div>
<a class="anchor" id="a399e6b6a3d8842f49de0758c5b25c67d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int JtagServerInitBbram </td>
          <td>(</td>
          <td class="paramtype">XilSKey_Bbram *&#160;</td>
          <td class="paramname"><em>InstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>JTAG Server Initialization routine for Bbram. </p>
<p>JTAG Server Initialization routine for Bbram.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>- instance pointer</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><pre class="fragment">  - XST_FAILURE - In case of failure
  - XST_SUCCESS - In case of Success
</pre></dd></dl>
<dl class="section note"><dt>Note</dt><dd></dd></dl>

<p>References <a class="el" href="xilskey__jscmd_8c.html#a84993b73c0bf1d71424fad91d4fdfbe7">js_init_zynq()</a>, <a class="el" href="xilskey__jscmd_8c.html#ab98b09590119fe0a6ab338013f13528d">js_printf</a>, <a class="el" href="xilskey__jscmd_8c.html#a720bf1335f27d3a597b46ae1b938c106">JtagInitGpio()</a>, <a class="el" href="xilskey__jscmd_8c.html#adbcca77303d5d6c281dbabec5a5f1ee3">JtagValidateMioPins()</a>, and <a class="el" href="xilskey__bbram_8c.html#ad332b969fb28da07cb32106cb4fbebf4">XilSKeyJtag</a>.</p>

</div>
</div>
<a class="anchor" id="a37c270a53d567eed209d11b83d16cca7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_RowCrcCalculation </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>PrevCRC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Addr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculates CRC value for each row of AES key. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">PrevCRC</td><td>holds the prev row's CRC. </td></tr>
    <tr><td class="paramname">Data</td><td>holds the present row's key. </td></tr>
    <tr><td class="paramname">Addr</td><td>stores the current row number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Crc of current row.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>Referenced by <a class="el" href="group__xilskey__cmn__crc.html#gaf973666d5d2787e571a17f6c12d6cd29">XilSKey_CrcCalculation()</a>, and <a class="el" href="group__xilskey__cmn__crc.html#ga0552daa4e1f376eaac1360aba6d23930">XilSkey_CrcCalculation_AesKey()</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="ad332b969fb28da07cb32106cb4fbebf4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">XilSKey_JtagSlr XilSKeyJtag</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>JTAG Tap Instance. </p>

<p>Referenced by <a class="el" href="xilskey__bbram__ultrascale__example_8c.html#afdb9b1c206a7bc8f6b18653dc3b5e5e1">Bbram_Close_Ultra()</a>, <a class="el" href="xilskey__jscmd_8c.html#a7d6c014687d7fabae96174e4e80907a3">Bbram_DeInit()</a>, <a class="el" href="xilskey__jscmd_8c.html#abae9797f8dabe8fe6089a60337059572">Bbram_Init()</a>, <a class="el" href="xilskey__jscmd_8c.html#a78e9cdbbe9a8bb08255b8cdada63efe5">Bbram_ProgramKey()</a>, <a class="el" href="xilskey__jscmd_8c.html#a0099206e41d3ca07d3d0feeb8a1802bb">Bbram_VerifyKey()</a>, <a class="el" href="xilskey__jscmd_8c.html#a50f568193dfe2570ed49e4e368725e2b">calcInstr()</a>, <a class="el" href="xilskey__jscmd_8c.html#a65f94f046816b7e5dddb8e06dcfa0db0">Jtag_Read_Sysmon()</a>, <a class="el" href="xilskey__jscmd_8c.html#a2240f1d411f1eef6605ee6da1426c5ba">JtagAES_Check_Ultrascale()</a>, <a class="el" href="xilskey__jscmd_8c.html#a59fd1f16ea68cca3d04d37883079e6f4">JtagRead()</a>, <a class="el" href="xilskey__jscmd_8c.html#a81be870dc9cfe995815d14bc106473a7">JtagRead_Status_Ultrascale()</a>, <a class="el" href="xilskey__jscmd_8c.html#a2740a0531078952f78e0b2680f62cd1a">JtagRead_Ultrascale()</a>, <a class="el" href="xilskey__jscmd_8c.html#ae229739e4765d3ed48b18e529764bdfe">JtagServerInit()</a>, <a class="el" href="xilskey__jscmd_8c.html#a399e6b6a3d8842f49de0758c5b25c67d">JtagServerInitBbram()</a>, <a class="el" href="xilskey__jscmd_8c.html#a8a1a649f81c76f0a81196ac2d6a411bc">JtagWrite()</a>, and <a class="el" href="xilskey__jscmd_8c.html#ad71fe773dff0bd882d39c2936e319c63">JtagWrite_Ultrascale()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
